-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: move hooks under own directory #1042
Conversation
Preview is ready. |
...refs: Array<React.Ref<T> | undefined> | ||
): React.RefCallback<T> | null { | ||
export type UseForkRefProps<K> = Array<React.Ref<K> | undefined>; | ||
export type UseForkRefResult<W> = React.RefCallback<W> | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is W
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generic variable
@@ -16,18 +16,20 @@ export type UseFileInputOutput = { | |||
}; | |||
}; | |||
|
|||
export type UseFileInputResult = UseFileInputOutput; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's mark old type with deprecation note
src/hooks/useUniqId/README.md
Outdated
import {useUniqId} from '@gravity-ui/uikit'; | ||
``` | ||
|
||
The `useUniqId` hook create uniq Id. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
creates unique ID
src/hooks/useUniqId/README.md
Outdated
|
||
## Result | ||
|
||
Id. `string` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ID
src/hooks/useForkRef/README.md
Outdated
import {useForkRef} from '@gravity-ui/uikit'; | ||
``` | ||
|
||
The `useForkRef` hook that can combine refs into a single Ref |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lowercase:
single ref
also moved
constants.ts
in right folder